home *** CD-ROM | disk | FTP | other *** search
Modula Implementation | 1997-01-15 | 3.1 KB | 95 lines | [TEXT/3PRM] |
- implementation module appleevents;
-
- TypeApplSignature :== 0x7369676E; // 'sign'
- KCoreEventClass :== 0x61657674; // 'aevt'
- KAEMiscStandards :== 0x6D697363; // 'misc'
- KAEQuitApplication :== 0x71756974; // 'quit'
- KAEDoScript :== 0x646F7363; // 'dosc'
- KeyDirectObject :== 0x2D2D2D2D; // '----'
- TypeChar :== 0x54455854; // 'TEXT'
- KeyErrorNumber :== 0x6572726E; // 'errn'
- KeyErrorString :== 0x65727273; // 'errs'
- TypeLongInteger :== 0x6C6F6E67; // 'long'
-
- SizeOfAEDesc :== 8;
- SizeOfAppleEvent :== 8;
-
- KAutoGenerateReturnID :== -1;
- KAnyTransactionID :== 0;
- KAENoReply :== 1;
- KAEWaitReply :== 3;
- KAENormalPriority :== 0;
- KNoTimeOut :== -2;
-
- :: AEDescPtr :== Int;
- :: AppleEventPtr :== Int;
-
- AECreateDesc :: !Int !{#Char} !AEDescPtr -> Int;
- AECreateDesc typeCode data result_p
- = code (typeCode=R2L,data=A0,result_p=D0)(error_code=W){
- instruction 0x4868 0x0008 | pea 8(a0)
- instruction 0x2F28 0x0004 | move.l 4(a0),-(sp)
- instruction 0x2F00 | move.l d0,-(sp)
- instruction 0x303C
- instruction 0x0825
- instruction 0xA816
- }
-
- AECreateAppleEvent :: !Int !Int !AEDescPtr !Int !Int !AppleEventPtr -> !Int;
- AECreateAppleEvent theAEEventClass theAEEventID target returnID transactionID result_p
- = code (theAEEventClass=R2L,theAEEventID=L,target=L,returnID=W,transactionID=L,result_p=L)(error_code=W){
- instruction 0x303C
- instruction 0x0B14
- instruction 0xA816
- }
-
- AEPutParamPtr :: !AppleEventPtr !Int !Int !{#Char} -> Int;
- AEPutParamPtr theAppleEvent theAEKeyword typeCode data
- = code (theAppleEvent=R2L,theAEKeyword=L,typeCode=L,data=A0)(error_code=W){
- instruction 0x4868 0x0008 | pea 8(a0)
- instruction 0x2F28 0x0004 | move.l 4(a0),-(sp)
- instruction 0x303C
- instruction 0x0A0F
- instruction 0xA816
- }
-
- AESend :: !AppleEventPtr !AppleEventPtr !Int !Int !Int !Int !Int -> Int;
- AESend theAppleEvent reply sendMode sendPriority timeOutInTicks idleProc filterProc
- = code (theAppleEvent=R2L,reply=L,sendMode=L,sendPriority=W,timeOutInTicks=L,idleProc=L,filterProc=L)(error_code=W){
- instruction 0x303C
- instruction 0x0D17
- instruction 0xA816
- }
-
- AEGetIntParamPtr :: !AppleEventPtr !Int !Int -> (!Int,!Int,!Int,!Int);
- AEGetIntParamPtr theAppleEvent theAEKeyword desiredType
- = code (theAppleEvent=R14L,theAEKeyword=L,desiredType=L)(error_code=W,typeCode=L,value=L,actualSize=L){
- instruction 0x486F 0x000E | pea 14+0(sp)
- instruction 0x486F 0x0016 | pea 14+4+4(sp)
- instruction 0x2F3C 0x0000 0x0004 | move.l #4,-(sp)
- instruction 0x486F 0x0022 | pea 14+12+8(sp)
- instruction 0x303C
- instruction 0x0E11
- instruction 0xA816
- }
-
- AEGetStringParamPtr :: !AppleEventPtr !Int !Int !{#Char} -> (!Int,!Int,!Int);
- AEGetStringParamPtr theAppleEvent theAEKeyword desiredType string
- = code (theAppleEvent=R10L,theAEKeyword=L,desiredType=L,string=A0)(error_code=W,typeCode=L,actualSize=L){
- instruction 0x486F 0x000E | pea 14+0(sp)
- instruction 0x4868 0x0008 | pea 8(a0)
- instruction 0x2F28 0x0004 | move.l 4(a0),-(sp)
- instruction 0x486F 0x001E | pea 14+12+4(sp)
- instruction 0x303C
- instruction 0x0E11
- instruction 0xA816
- }
-
- AEDisposeDesc :: !AEDescPtr -> Int;
- AEDisposeDesc theAEDesc
- = code (theAEDesc=R2L)(error_code=W){
- instruction 0x303C
- instruction 0x0204
- instruction 0xA816
- }
-